﻿<UserControl
	x:Class="SharpEnviro.Desktop.DesktopObject"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	Focusable="True"
	Loaded="UserControl_Loaded"
	MouseDown="UserControl_MouseDown"
	PreviewMouseDown="UserControl_PreviewMouseDown"
	PreviewMouseMove="UserControl_PreviewMouseMove"
	PreviewMouseUp="UserControl_PreviewMouseUp"
	LostMouseCapture="UserControl_LostMouseCapture"
	GotFocus="UserControl_GotFocus"
	LostFocus="UserControl_LostFocus">
	<UserControl.Resources>
		
		<Style TargetType="{x:Type Border}">
			
			<Setter Property="Background" Value="#01000000" />
			<Setter Property="CornerRadius" Value="10" />
			<Setter Property="FocusVisualStyle" Value="{x:Null}" />
			
			<Style.Triggers>
				
				<!-- TODO: Find a better way than all these MultiTriggers with Conditions??? -->
				<MultiTrigger>
					<MultiTrigger.Conditions>
						<Condition Property="IsMouseOver" Value="True" />
						<Condition Property="IsFocused" Value="False" />
						<Condition Property="IsMouseCaptured" Value="False" />
					</MultiTrigger.Conditions>
					<Setter Property="Background" Value="#50FFFFFF" />
				</MultiTrigger>
				
				<MultiTrigger>
					<MultiTrigger.Conditions>
						<Condition Property="IsMouseOver" Value="False" />
						<Condition Property="IsFocused" Value="True" />
						<Condition Property="IsMouseCaptured" Value="False" />
					</MultiTrigger.Conditions>
					<Setter Property="Background" Value="#50FFFFFF" />
				</MultiTrigger>
				
				<MultiTrigger>
					<MultiTrigger.Conditions>
						<Condition Property="IsMouseOver" Value="False" />
						<Condition Property="IsFocused" Value="False" />
						<Condition Property="IsMouseCaptured" Value="True" />
					</MultiTrigger.Conditions>
					<Setter Property="Background" Value="#50FFFFFF" />
				</MultiTrigger>
				
				<MultiTrigger>
					<MultiTrigger.Conditions>
						<Condition Property="IsMouseOver" Value="True" />
						<Condition Property="IsFocused" Value="True" />
						<Condition Property="IsMouseCaptured" Value="False" />
					</MultiTrigger.Conditions>
					<Setter Property="Background" Value="#50FFFFFF" />
				</MultiTrigger>

				<MultiTrigger>
					<MultiTrigger.Conditions>
						<Condition Property="IsMouseOver" Value="True" />
						<Condition Property="IsFocused" Value="False" />
						<Condition Property="IsMouseCaptured" Value="True" />
					</MultiTrigger.Conditions>
					<Setter Property="Background" Value="#50FFFFFF" />
				</MultiTrigger>

				<MultiTrigger>
					<MultiTrigger.Conditions>
						<Condition Property="IsMouseOver" Value="False" />
						<Condition Property="IsFocused" Value="True" />
						<Condition Property="IsMouseCaptured" Value="True" />
					</MultiTrigger.Conditions>
					<Setter Property="Background" Value="#50FFFFFF" />
				</MultiTrigger>
				
				<MultiTrigger>
					<MultiTrigger.Conditions>
						<Condition Property="IsMouseOver" Value="True" />
						<Condition Property="IsFocused" Value="True" />
						<Condition Property="IsMouseCaptured" Value="True" />
					</MultiTrigger.Conditions>
					<Setter Property="Background" Value="#50FFFFFF" />
				</MultiTrigger>
				
			</Style.Triggers>
			
		</Style>
		
		<Style TargetType="{x:Type TextBlock}">
			<Setter Property="Foreground" Value="White" />
			<Setter Property="Margin" Value="7" />
		</Style>
		
	</UserControl.Resources>
	
	<Border Name="border1" Focusable="True">
		
		<Grid Name="grid1">
			
			<Grid.RowDefinitions>
				<RowDefinition />
				<RowDefinition />
			</Grid.RowDefinitions>
			
			<Image
				Name="image1"
				VerticalAlignment="Center"
				HorizontalAlignment="Center"
				Margin="7,7,7,0" />

			<TextBlock
				Name="textBlock1"
				TextAlignment="Center"
				TextWrapping="Wrap"
				TextTrimming="CharacterEllipsis"
				Grid.Row="1" />
			
		</Grid>
	</Border>
</UserControl>
